<script src="js/proinfo/purchase/buyingApplyFor.js"></script>
<aside class="lg-side">
    <div class="panel-heading tab-bg-dark-navy-blue okr-tab-head tab-right "></div>
    <div class="inbox-body mi-h8">
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading">
                        请购申请【请购人申请（填写采购清单、资产库申请清单）】
                    </header>
                    <div class="panel-body">
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">申请用途</label>
                            <div class="col-sm-10">
                                <select ng-model="applyInfo.applicationCode" certus-required class="form-control">
                                    <option ng-repeat="x in select.applyForSelect" value="{{x.code}}">
                                        {{x.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">归属分公司选择</label>
                            <div class="col-sm-10">
                                <select ng-model="applyInfo.affiliationCode" certus-required class="form-control">
                                    <option ng-repeat="x in select.affiliationSelect" value="{{x.code}}">
                                        {{x.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">申请说明</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" maxlength="120" ng-model="applyInfo.applyInstruction"></textarea>
                            </div>
                        </div>
                    </div>
                </section>
                <section class="panel hdproc" style="display: none;">
                    <header class="panel-heading">
                        项目采购申请*
                    </header>
                    <div class="panel-body">
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">大类</label>
                            <div class="col-sm-10">
                                <select class="form-control" certus_required_polyfill ng-model="applyItem.bigClassCode" ng-change="sbchanged(applyItem.bigClassCode)">
                                    <option ng-repeat="x in select.bigClassSelect" value="{{x.code}}">
                                        {{x.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group customerForm" ng-show="sbshow">
                            <label class="col-sm-2 control-label">资产类目</label>
                            <div class="col-sm-10">
                                <select class="form-control" certus_required_polyfill ng-model="applyItem.commodityCateCode" ng-change="cateChange(applyItem.commodityCateCode)">
                                    <option ng-repeat="x in select.cateCodeSelect" value="{{x.code}}">
                                        {{x.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group customerForm" ng-show="sbshow">
                            <label class="col-sm-2 control-label">资产类别</label>
                            <div class="col-sm-10">
                                <select class="form-control" certus_required_polyfill ng-model="applyItem.commodityClassCode">
                                    <option ng-repeat="x in select.classCodeSelect" value="{{x.code}}">{{x.name}}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group customerForm" ng-show="sbbushow">
                            <label class="col-sm-2 control-label">类型说明</label>
                            <div class="col-sm-10">
                                <input type="text" certus_required_polyfill class="form-control" certus_an_limit_length="50" ng-model="applyItem.typeMark">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">名称</label>
                            <div class="col-sm-10">
                                <input type="text" certus_required_polyfill class="form-control" ng-model="applyItem.name">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label" >品名及规格</label>
                            <div class="col-sm-10">
                                <input type="text"  certus_required_polyfill class="form-control" ng-model="applyItem.descAndSpec">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">数量</label>
                            <div class="col-sm-10">
                                <input type="text" certus_an_limit_length_num="50" certus_required_polyfill class="form-control" ng-model="applyItem.quantity">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">预估金额</label>
                            <div class="col-sm-10">
                                <input type="text" certus_an_int  certus_an_limit_length_num="50" certus_required_polyfill class="form-control" ng-model="applyItem.estimatedAmount">
                            </div>
                        </div>
                        <div class="form-group customerForm">
                            <label class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" maxlength="120" certus_required_polyfill ng-model="applyItem.remark"></textarea>
                            </div>
                        </div>
                        <p class="default-buttons">
                            <a href="javascript:void(0);" class="button-back btn btn-info" onclick="hdproc();">取消</a>
                            <a href="javascript:void(0);" class="button-next  btn btn-info"
                               ng-click="applyItemSubmit()">提交</a>
                        </p>
                    </div>
                </section>
                <section class="panel">
                    <header class="panel-heading">
                        采购申请清单
                        <i class="add-icon icon-plus" onclick="shproc();"> 新增</i>
                    </header>
                    <div class="panel-body">
                        <div id="proc1Container" class="dlshouwen-grid-container"></div>
                    </div>
                </section>
                <section class="panel">
                    <header class="panel-heading add-heading">
                        资产库申请清单
                        <i class="add-icon icon-plus" data-toggle="modal" href="#myModal"> 新增</i>
                    </header>
                    <div class="panel-body">
                        <div id="library1Container" class="dlshouwen-grid-container"></div>
                    </div>
                </section>
                <section class="panel">
                    <div class="panel-body">
                        <p class="default-buttons">
                            <a href="javascript:void(0);" class="button-back btn btn-info"
                               onclick="window.history.back()">返回</a>
                            <a href="javascript:void(0);" class="button-next  btn btn-info"
                               ng-click="submmitPurchase()">提交</a>
                        </p>
                    </div>
                </section>
                <!-- Modal -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <section class="panel">
                                <div class="panel-heading add-heading">
                                    资产库信息
                                    <i class="add-icon icon-remove" data-dismiss="modal" aria-hidden="true"></i>
                                </div>
                                <div class="panel-body">
                                    <div class="search-heading">
                                        <span>资产类目:</span>
                                        <select class="form-control">
                                            <option>请选择</option>
                                        </select>
                                        <span>资产类别:</span>
                                        <select class="form-control" ng-model="select.productType">
                                            <option ng-repeat="x in select.assetClassSelect" value="{{x.styleId}}">
                                                {{x.assetStyle2}}
                                            </option>
                                        </select>
                                        <label class="label label-primary" ng-click="searchProduct()">搜索</label>
                                    </div>
                                    <div id="lidContainer" class="dlshouwen-grid-container"></div>
                                    <div id="lidToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                                </div>
                                <div class="panel-bg"></div>
                            </section>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->
            </div>
        </div>
    </div>
</aside>